Optimal. Leaf size=41 \[ \frac{2 c \tan (e+f x)}{f (a \sec (e+f x)+a)}-\frac{c \tanh ^{-1}(\sin (e+f x))}{a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0533329, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067, Rules used = {3957, 3770} \[ \frac{2 c \tan (e+f x)}{f (a \sec (e+f x)+a)}-\frac{c \tanh ^{-1}(\sin (e+f x))}{a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3957
Rule 3770
Rubi steps
\begin{align*} \int \frac{\sec (e+f x) (c-c \sec (e+f x))}{a+a \sec (e+f x)} \, dx &=\frac{2 c \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac{c \int \sec (e+f x) \, dx}{a}\\ &=-\frac{c \tanh ^{-1}(\sin (e+f x))}{a f}+\frac{2 c \tan (e+f x)}{f (a+a \sec (e+f x))}\\ \end{align*}
Mathematica [A] time = 0.0686182, size = 77, normalized size = 1.88 \[ -\frac{c \left (-\frac{2 \tan \left (\frac{1}{2} (e+f x)\right )}{f}-\frac{\log \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )}{f}+\frac{\log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )}{f}\right )}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.055, size = 61, normalized size = 1.5 \begin{align*} 2\,{\frac{c\tan \left ( 1/2\,fx+e/2 \right ) }{fa}}+{\frac{c}{fa}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) -1 \right ) }-{\frac{c}{fa}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.954331, size = 136, normalized size = 3.32 \begin{align*} -\frac{c{\left (\frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac{\log \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac{\sin \left (f x + e\right )}{a{\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - \frac{c \sin \left (f x + e\right )}{a{\left (\cos \left (f x + e\right ) + 1\right )}}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.469585, size = 190, normalized size = 4.63 \begin{align*} -\frac{{\left (c \cos \left (f x + e\right ) + c\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) -{\left (c \cos \left (f x + e\right ) + c\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 4 \, c \sin \left (f x + e\right )}{2 \,{\left (a f \cos \left (f x + e\right ) + a f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{c \left (\int - \frac{\sec{\left (e + f x \right )}}{\sec{\left (e + f x \right )} + 1}\, dx + \int \frac{\sec ^{2}{\left (e + f x \right )}}{\sec{\left (e + f x \right )} + 1}\, dx\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.30494, size = 82, normalized size = 2. \begin{align*} -\frac{\frac{c \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac{c \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a} - \frac{2 \, c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}{a}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]